const baseURL = "http://38478x75s7.qicp.vip"

export default function $http(path, params) {
	return new Promise((resolve, reject) => {
		uni.request({
			...params,
			url: baseURL + path,
			header: {
				"Content-Type": "application/json",
				auth_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyQWNjb3VudCI6InB5eSIsImV4cCI6MTYxOTUzMDA4OSwidXNlcklkIjoiNSJ9.JYzUVuu8r4TmnmghKtidP-X_rGefEhbbLokFmSny0XI"
			},
			success(res) {
				resolve(res.data)
			},
			fail(res) {
				reject(res)
			}
		})
	})
}
